package com.tdkj.model.bbs;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * EjfTrashBoxId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class EjfTrashBoxId implements java.io.Serializable {

	// Fields

	private Integer topicId;
	private Integer replyId;

	// Constructors

	/** default constructor */
	public EjfTrashBoxId() {
	}

	/** full constructor */
	public EjfTrashBoxId(Integer topicId, Integer replyId) {
		this.topicId = topicId;
		this.replyId = replyId;
	}

	// Property accessors

	@Column(name = "topicID", nullable = false)
	public Integer getTopicId() {
		return this.topicId;
	}

	public void setTopicId(Integer topicId) {
		this.topicId = topicId;
	}

	@Column(name = "replyID", nullable = false)
	public Integer getReplyId() {
		return this.replyId;
	}

	public void setReplyId(Integer replyId) {
		this.replyId = replyId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof EjfTrashBoxId))
			return false;
		EjfTrashBoxId castOther = (EjfTrashBoxId) other;

		return ((this.getTopicId() == castOther.getTopicId()) || (this.getTopicId() != null && castOther.getTopicId() != null && this.getTopicId().equals(castOther.getTopicId())))
				&& ((this.getReplyId() == castOther.getReplyId()) || (this.getReplyId() != null && castOther.getReplyId() != null && this.getReplyId().equals(castOther.getReplyId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getTopicId() == null ? 0 : this.getTopicId().hashCode());
		result = 37 * result + (getReplyId() == null ? 0 : this.getReplyId().hashCode());
		return result;
	}

}